import {Link,hashHistory} from "react-router"

export default React.createClass({
	getInitialState :function(){
		return {
			init :  "icon-leimupinleifenleileibie1",
			no:{
				dispaly : "none",
				zIndex: "-1"
			}
			
		}
	},
	cS:true,
	bh:function(){
		var obj = $("#list_goods_btn_cla")
		if(this.cS){
			this.setState({
				init :"icon-fenlei2" 
			})
			this.cS = !this.cS
		 	 obj.removeClass();
             obj.addClass("list_goods_two");
		}else{
			this.setState({
				init :"icon-leimupinleifenleileibie1" 
			})
			this.cS = !this.cS
			obj.removeClass();
            obj.addClass("list_goods_one");
		}
			
	},
	isM : true,
	run:function(){ 
		 if(this.isM){
		 	this.setState({
		 		no:{
		 			display :"block",
		 			zIndex: "10"
		 		}
		 		
		 	})
		 	this.isM = !this.isM 
		 } 
		 	else{
		 		this.setState({
		 			no :{
		 				display :" none",
		 				zIndex: "-1"
		 			}
		 		})
		 		this.isM = !this.isM 
		 		
		 	}
		 
	},
	render : function(){
		return (
			<div	className="list_hedar_bom">
				<div>
					<Link className="activered" onClick={this.run}>
					综合排序
						<i className="iconfont icon-xiaosanjiao list_heder_btnl activered"></i>
					</Link>
					<Link>新上架</Link>
					<Link>人气</Link>
					<Link>
					筛选
						<i className="iconfont icon-xiaosanjiao list_heder_btnl"></i>
					</Link>
				</div>
				<span className={"iconfont list_heda_bian "+this.state.init} onClick={this.bh}></span>
				<div className = "list_pai" style={this.state.no}>
					<div className="avtive">
						<b>综合排序</b>
						<i className="iconfont list_pai_icon icon-duihao"></i>
					</div>
					<div>
						<b>销量优先</b>
						<i className="iconfont list_pai_icon icon-duihao"></i>
					</div>
					<div>
						<b>价格从高到底</b>
						<i className="iconfont list_pai_icon icon-duihao"></i>
					</div>
					<div>
						<b>价格从高到底</b>
						<i className="iconfont list_pai_icon icon-duihao"></i>
					</div>
				</div>
			</div>
		)
	}
})
